package com.ogawa.jopai.devicemanage.service

import com.ogawa.base.base.BaseResponseBean
import com.ogawa.jopai.devicemanage.bean.*
import retrofit2.http.*

interface MassageApiService {


        /**
         * 获取用户设备
         */
        @GET("/api/deviceService/v1/userDevices/devices")
        suspend fun getUserDevice(@Query("platCode")platCode:String): BaseResponseBean<List<UserDeviceBean>>
        /**
         * APP支持设备类型列表
         */
        @GET("/api/deviceService/v1/deviceTypes")
        suspend fun getDeviceTypes(@Query("platCode")platCode:String): BaseResponseBean<List<DeviceTypeBean>>
        /**
         * 获取用户未处理分享信息
         */
        @GET("/api/deviceService/v1/deviceShare")
        suspend fun getDeviceShare(@Query("userId")userId:String): BaseResponseBean<List<GetDeviceShareResponse>>
        /**
         * 按摩椅运行查询【根据MAC获取序列号】-准确
         * param:设备序号或mac地址
         * isMac:是否查询mac 0否 1是
         */
        @GET("/api/device-gw/v1/chair/status")
        suspend fun getChairStatus(@Query("param") param: String,@Query("isMac") isMac: String): BaseResponseBean<GetChairStatusResponse>
        /**
         * 按摩椅状态批量查询-数据库数据不准确
         * param:设备sn码列表
         */
        @GET("/api/deviceService/v1/userDevices/status")
        suspend fun getChairStatusCol(@Query("sn") sn: String): BaseResponseBean<List<GetChairStatusColResponse>>
        /**
         * 处理分享信息
         */
        @PUT("/api/deviceService/v1/deviceShare")
        suspend fun putDeviceShare(@Body response: PutDeviceShareRequest): BaseResponseBean<PutDeviceShareResponse>

        /**
         * 用户设备-删除
         * Content-Type	application/x-www-form-urlencoded
         */
        @DELETE("/api/deviceService/v1/userDevices/{deviceId}")
        @Headers("Content-Type:application/x-www-form-urlencoded")
        suspend fun userDevicesDelete(@Path("deviceId") deviceId: String?): BaseResponseBean<DeleteUserDeviceResponse>
        /**
         * 设备分享
         * Content-Type	application/json
         */
        @POST("/api/deviceService/v1/deviceShare")
        suspend fun deviceShare(@Body shareBean: DeviceShareRequest?): BaseResponseBean<DeviceShareResponse>
        /**
         * 修改用户设备信息
         */
        @PUT("/api/deviceService/v1/userDevices/{deviceId}")
        suspend fun changeUserDevices(@Path("deviceId") deviceId: String?,
                                    @Body request: ChangeUserDeviceInfoRequest
        ): BaseResponseBean<ChangeUserDeviceInfoResponse>

}